package com.daotingli.backendprograms.Controller.Register;

import com.daotingli.backendprograms.Service.Register.RegisterService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class RegisterController {
    @Autowired
    private RegisterService registerService;
   @RequestMapping(path = "/register",method = RequestMethod.POST,params = {"username","password","identity","userphone"})
    public Map register(@RequestParam("username") String username, @RequestParam("password") String password, @RequestParam("identity") String identity,@RequestParam("userphone") String userphone){

       return registerService.register(username,password,identity,userphone);
   }

}
